package com.jeethink.teach.service.impl;

import java.util.List;

import com.jeethink.teach.param.TeachPersonalDocumentsParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jeethink.teach.mapper.TeachPersonalDocumentsMapper;
import com.jeethink.teach.domain.TeachPersonalDocuments;
import com.jeethink.teach.service.ITeachPersonalDocumentsService;
import com.jeethink.common.support.Convert;

/**
 * 个人文件 服务层实现
 * 
 * @author jeethink
 * @date 2022-09-04
 */
@Service
public class TeachPersonalDocumentsServiceImpl implements ITeachPersonalDocumentsService 
{
	@Autowired
	private TeachPersonalDocumentsMapper teachPersonalDocumentsMapper;

	/**
     * 查询个人文件信息
     * 
     * @param id 个人文件ID
     * @return 个人文件信息
     */
    @Override
	public TeachPersonalDocuments selectTeachPersonalDocumentsById(Long id)
	{
	    return teachPersonalDocumentsMapper.selectTeachPersonalDocumentsById(id);
	}

	@Override
	public int updateDownloadTimes(TeachPersonalDocuments teachPersonalDocuments) {
		return teachPersonalDocumentsMapper.updateDownloadTimes(teachPersonalDocuments);
	}

	/**
     * 查询个人文件列表
     * 
     * @param teachPersonalDocuments 个人文件信息
     * @return 个人文件集合
     */
	@Override
	public List<TeachPersonalDocuments> selectTeachPersonalDocumentsList(TeachPersonalDocumentsParam param)
	{
	    return teachPersonalDocumentsMapper.selectTeachPersonalDocumentsList(param);
	}
	
    /**
     * 新增个人文件
     * 
     * @param teachPersonalDocuments 个人文件信息
     * @return 结果
     */
	@Override
	public int insertTeachPersonalDocuments(TeachPersonalDocuments teachPersonalDocuments)
	{
	    return teachPersonalDocumentsMapper.insertTeachPersonalDocuments(teachPersonalDocuments);
	}
	
	/**
     * 修改个人文件
     * 
     * @param teachPersonalDocuments 个人文件信息
     * @return 结果
     */
	@Override
	public int updateTeachPersonalDocuments(TeachPersonalDocuments teachPersonalDocuments)
	{
	    return teachPersonalDocumentsMapper.updateTeachPersonalDocuments(teachPersonalDocuments);
	}

	/**
     * 删除个人文件对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTeachPersonalDocumentsByIds(String ids)
	{
		return teachPersonalDocumentsMapper.deleteTeachPersonalDocumentsByIds(Convert.toStrArray(ids));
	}
	
}
